// index.js
Page({
    data: {
        cardData: [{
            author_avatar: "/static/image/avatar.png",
            author_name: "七月在夏天",
            author_id: "1",
            posttime: "18个小时前",
            container: "很简单，豆瓣现在这样就给大家指了一条明路:以后凡是这种国产的风口浪尖的的片子，会涉及到各方背后利益关系的片子...",
            likenumber: "160",
            commentnumber: "10"
        }],
        userdata: {}
    },
    onShow() {
        var that = this;
        wx.getStorage({
            key: 'userdata',
            success(res) {
                that.setData({
                    'userdata': res.data
                })
            }
        });
        wx.request({
            url: 'https://www..space/article/getArticle',
            method: 'GET',
            success(e) {
                if (e.statusCode == 200) {
                    that.setData({
                        'cardData': e.data
                    })
                }
            }
        })
    }
})